package com.weitu.environmental.solidWaste.service.impl;

import com.weitu.environmental.solidWaste.entity.SolidWasteApply;
import com.weitu.environmental.solidWaste.entity.SolidWasteStorage;
import com.weitu.environmental.solidWaste.mapper.*;
import com.weitu.environmental.solidWaste.service.SolidWasteStorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @author zhangqingxi 2017-04-17
 */
@Service
public class SolidWasteStorageServiceImpl implements SolidWasteStorageService {
    private final SolidWasteStorageMapper solidWasteStorageMapper;


    @Autowired
    public SolidWasteStorageServiceImpl(SolidWasteStorageMapper solidWasteStorageMapper) {
        this.solidWasteStorageMapper = solidWasteStorageMapper;
    }





    @Override
    public List<SolidWasteStorage> findByParam(Map paramMap) {
        return solidWasteStorageMapper.findByParam(paramMap);
    }

    @Override
    public Integer findByParamCount(Map paramMap) {
        return solidWasteStorageMapper.findByParamCount(paramMap);
    }

    @Override
    public SolidWasteStorage findById(String id) {
        return solidWasteStorageMapper.findById(id);
    }

    @Transactional
    @Override
    public Integer add(Map paramMap) {
        return solidWasteStorageMapper.add(paramMap);
    }

    @Transactional
    @Override
    public Integer updateById(Map paramMap) {
        return solidWasteStorageMapper.updateById(paramMap);
    }


}
